<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h1>{{ msg }}</h1>
      <p>我叫 {{ obj.name }}, 今年 {{ obj.age}} 岁了</p>
    </div>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>
      const { createApp, ref } = Vue;
      createApp({
        setup() {
          const msg = ref("hello Vue3");
          const obj = ref({
            name: "小vue",
            age: 9,
          });
          return {
            msg,
            obj,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
